
export const constantRoutes =[
    {
        path: '/',
        redirect: '/login',
        meta: {
            hidden: true
        }
    },
    {
        path: '/login',
        component: () => import('@/views/login/loginpage.vue'),
        name: 'login',
        meta: {
            title: '登录',
            icon: 'UserFilled',
            hidden: true
        }
    },
    {
        path: '/home',
        component: () => import('@/views/home/homepage.vue'),
        name: 'home',
        meta: {
            title: '首页',
            icon: 'HomeFilled',
            hidden: false
        },
        redirect: '/homepage',
        children: [
            {
                path: '/homepage',
                component: () => import('@/views/homepage/index.vue'),
                name: 'homepage',
                meta: {
                    title: '主页',
                    icon: 'HomeFilled',
                    hidden: false
                }
            }
        ]
    },
    {
        path: '/datascreen',
        component: () => import('@/views/datascreen/index.vue'),
        name: 'datascreen',
        meta: {
            title: '数据大屏',
            icon: 'DataAnalysis',
            hidden: false
        }
    }
]

export const asyncRoutes = [
    
    {
        path: '/acl',
        component: () => import('@/views/home/homepage.vue'),
        name: 'Acl',
        meta: {
            title: '权限管理',
            icon: 'Lock',
            hidden: false
        },
        redirect: '/user',
        children: [
            {
                path: '/user',
                component: () => import('@/views/acl/user/index.vue'),
                name: 'User',
                meta:{
                    title:'用户管理',
                    hidden:false,
                    icon:'User'
                }
            },
            {
                path: '/role',
                component: () => import('@/views/acl/role/index.vue'),
                name: 'Role',
                meta:{
                    title:'角色管理',
                    hidden:false,
                    icon:'UserFilled'
                }
            },
            {
                path: '/menu',
                component: () => import('@/views/acl/menu/index.vue'),
                name: 'Permission',
                meta:{
                    title:'菜单管理',
                    hidden:false,
                    icon:'Switch'
                }
            }
        ]
    },
    {
        path: '/product',
        component: () => import('@/views/home/homepage.vue'),
        name: 'Product',
        meta:{
            title:'商品管理',
            hidden:false,
            icon:'Goods'
        },
        redirect: '/trademark',
        children:[
            {
                path: '/trademark',
                component: () => import('@/views/product/trademark/index.vue'),
                name: 'Trademark',
                meta:{
                    title:'品牌管理',
                    hidden:false,
                    icon:'ShoppingCart'
                }
            },
            {
                path: '/attr',
                component: () => import('@/views/product/attr/index.vue'),
                name: 'Attr',
                meta:{
                    title:'属性管理',
                    hidden:false,
                    icon:'Eleme'
                }
            },
            {
                path: '/spu',
                component: () => import('@/views/product/spu/index.vue'),
                name: 'Spu',
                meta:{
                    title:'spu管理',
                    hidden:false,
                    icon:'Handbag'
                }
            },
            {
                path: '/sku',
                component: () => import('@/views/product/sku/index.vue'),
                name: 'Sku',
                meta:{
                    title:'sku管理',
                    hidden:false,
                    icon:'TakeawayBox'
                }
            }
        ]
    }
]

export const anyRoutes = [
    {
        path: '/404',
        component: () => import('@/views/404/404.vue'),
        name: '404',
        meta: {
            title: '404',
            icon: 'Failed',
            hidden: true
        }
    },
    {
        path: '/:pathMatch(.*)*',
        redirect: '/404',
        name: 'any',
        meta: {
            title: '404',
            icon: 'Failed',
            hidden: true
        }
    }
]
